The TRILL protocol, recommended by the Internet Engineering Task Force (IETF), is a routing protocol according to which calculation is performed based on a link state on a Layer 2 network, to resolve a deficiency in a Spanning Tree Protocol (STP) in a large data center. The data center may use TRILL to build a large Layer 2 network, to overcome shortcomings of a traditional Layer 2 network: a low bandwidth utilization and slow convergence.
FIG. 1 is a schematic architectural diagram of a TRILL network in the prior art. As shown in FIG. 1, the TRILL network uses a two-layer structure, including multiple routing bridges (RB) having an access function, and multiple gateways having a forwarding function. On the TRILL network, a same TRILL physical network may be shared by different tenants (a tenant refers to a user using a system and computer computing resource). Each tenant uses at least one Layer 2 virtual network. Each Layer 2 virtual network is identified by a 12-bit virtual local area network identifier (VLAN ID) or a 24-bit fine grained label (FGL). Each Layer 2 virtual network may include multiple terminals. Different terminals on a same Layer 2 virtual network may access different RBs, and the different terminals can communicate with each other by using one or more RBs. A multicast packet may be forwarded between terminals of different Layer 2 virtual networks by using any gateway that is on the TRILL network.
Generally, on a TRILL network, according to a Protocol Independent Multicast (PIM) protocol, each Layer 2 virtual network specifies a gateway that forwards a multicast packet for the Layer 2 virtual network, that is, only the gateway specified by the Layer 2 virtual network can copy and forward a multicast packet sent by each terminal that is on the Layer 2 virtual network. For example, in FIG. 1, assuming that terminal 1 and terminal 3 are on Layer 2 virtual network VLAN 10 (the VLAN 10 is not shown in FIG. 1) and a specified gateway of Layer 2 virtual network VLAN 10 is gateway 1, only gateway 1 can forward a multicast packet that is on the VLAN 10. In this case, if terminal 1 sends 1,000 groups of different multicast packets, the 1,000 groups of multicast packets can be copied and forwarded across Layer 2 virtual networks by using only gateway 1.
Due to the one-to-one correspondence between a gateway and a Layer 2 virtual network, all multicast packets on a Layer 2 virtual network are copied and forwarded by using a fixed gateway. Therefore, when a large number of multicast packets on a Layer 2 virtual network need to be forwarded, a specified gateway of the Layer 2 virtual network has a relatively heavy burden.